package com.wolfheader.wolfgame.controller.admin;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.wolfheader.wolfgame.controller.BaseController;

/**
 * Controller - 注销
 * 
 */
@Controller("logoutController")
@RequestMapping("/admin/logout")
public class LogoutController extends BaseController {

	/**
	 * 注销
	 */
	@RequestMapping
	public String logout(HttpServletRequest request, HttpServletResponse response, HttpSession session) {
		Subject sb = SecurityUtils.getSubject();
		sb.logout();
		return HOMEPAGE_REDIRECT_URL + "admin/login";
	}

}